<pre>
<?
include "class.memcachedaggregator.php";
include "class.objectbase.php";

$objCache = new objectBase();

//print_r($objCache);


$key = "mykey";
$data = new stdClass;
$data->mydata = "testing";
$objCache->set($key, $data) or die("Could not save data to cache");
echo "stored data in cache!\r\n";
ob_flush(); flush();

if ($result = $objCache->get($key)){
echo "data dump from cache:\r\n";  
print_r($result); 
}else{
    echo "data not dump from cache:\r\n";
}

$data2 = new stdClass;
$data2->mydata = "testing replace".rand();


$objCache->replace($key, $data2) or die("Could not save data to cache");
echo "replaced stored data in cache!\r\n";
ob_flush(); flush();



// get from memcache
if ($result = $objCache->get($key)){
echo "data dump from cache:\r\n";
print_r($result);	
}else{
	echo "data not dump from cache:\r\n";
}

//$objCache->delete($key);



//echo $objCache->flush();
echo "<h1>Debug</h1>";
foreach ($objCache->debugHandler() as $t)
{
    echo $t["date"]	." - ". $t["message"]."\r\n";
}


?>
